﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WowParserLib.Events;
using WowParserLib.EventParsers;
using WowParserLib.Events.SuffixArgs;
namespace WowParserLib.Events
{
    public class RangeDamage: RangeEvent
    {
        DamageArgs _arg;

        public override string ToString()
        {
            return base.ToString() + " " + _arg.Amount + ((_arg.Critical) ? "*" : "");//.SpellSchool;
        }

        protected override int getDamage()
        {
            return _arg.Amount - (_arg.Blocked + _arg.Absorbed);
        }

        protected override void initialize(params EventArguments[] args)
        {
            base.initialize(args);
            foreach (EventArguments arg in args)
            {
                if (arg is DamageArgs)
                {
                    _arg = arg as DamageArgs;
                }
            }
        }
    }
}
